home *** CD-ROM | disk | FTP | other *** search
- Path: news.vol.it!news
- From: bizzetti@mbox.vol.it (Fabio Bizzetti)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: AB3D II beats Quake....
- Date: 1 Apr 1996 02:16:15 GMT
- Organization: Video On Line
- Distribution: world
- Message-ID: <6932.6665T243T2605@mbox.vol.it>
- References: <4jbkpc$mbr@mopo.cc.lut.fi> <1434.6662T1116T1344@epma.demon.co.uk>
- NNTP-Posting-Host: molcl8.vol.it
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
-
- >>>C is slow as hell, and if you say "it's fast enough with a 700Mhz CPU" then
- >>>I tell you that also assembly becomes faster with the 700Mhz CPU. You're
- >>>running away from your shadow: ASM will always be losta faster and better
- >>>than C.
-
- >F(l)abio, ;-)
-
- >I agree with you that 68000 is neccesary to get the best out of the
- >amiga, not many demos etc. are written in C (thank god!). However you are
- >wrong to assume that compilers cannot generate code as well as humans. As we
- >are moving into the RISC era, CPUs have fewer instructions which are a lot
- >easier for a compiler to make great code with, in fact on certain mainframe
- >systems compilers generate code which is as fast as we could write in asm.
-
- Yes :) but why it must be asm or C? :)
- you can help asm a lot, as machine language already is through asm mnemonics.
- I see it as "high level assembly" support, just call it advanced macros,
- subroutines where it suits (dos, not fast I/O, OS interfaces, etc..).
- Coding all these boring parts in asm, is like writing a program in machine
- language ("binary").
- tradition tends to associate assembly with nothing else than assembly.
- example: why can't we just have the 680x0 opcode "CLR.L A0" instead of always
- using "SUB.L A0,A0"? is it that shameful to add a pseudo instruction?
- or, why dont we just use subroutines for Load/Save operations, making them
- use variables and saving all registers contents, thus being able to mix
- these virtual Load/Save/Rename/etc.. instructions with pure ASM? Without
- being worried to save registers and optimize speed where it would be all
- wasted by dos.library itself, but instead optimize the flexibility of the
- code to use these dos instructions as if they were part of the CPU instruction
- set. Or, what's wrong in having IF/THEN/ELSE "assembly" instructions when it's
- possible to make them as fast as the best asm possible? but there're a lot
- of cases in which you really need asm to do things, but it's only fun IMO.
- You can write macros, or do just like I did; writing a program that gets your
- mixed asm / high_level_asm sources and features advanced "macros" to
- translate the hla parts into asm source in output. You give a mixed hla/asm
- source in input, you get a only-asm source (also commented) in output.
- Other advantage? you can have more than 1 instruction in a line.
- Well, this is not a real compiler, nor a high level language, this is just
- high level assembly, and it is different than assembly as much as assembly
- is different than machine-language: easier, not slower indeed.
-
- I dont really like C, I like Basic for its semplicity maybe, but the only
- high level language I like is Forth, but it's an exception itself, being a
- futuristic machine language.
-
- >As compilers become more intelligent we will see huge speed increases in
- >non-asm code speed which will effectively make asm obsolete,
-
- Hmm.. dont really bet on it.
- There're 2 cases:
-
- 1) asm gets too complex. In this case, I recall the old days of 6502 and it
- seems hell compared to the (simpler) RISC cpu's of today, so dont really
- think that in games/demos (including any application where speed matters)
- it'll be difficult to code in *any* asm. It's just a question of getting
- accustomed, nothing else. RISC brings us back into the complexity of the
- past, but 8bit CPU's have been a beast that no modern CPU will make us
- miss. If you say that with 8bit CPU's you had to spend 1 week for 10K of
- code but today you'll need to fill 400K of code, then dont worry, because
- if you help yourself with tools, you always get the best speed possible,
- at least the 98%-99% if you want to. I mean, if it seemed natural to stop
- coding in machine language (like on the Vic20, 169,8,141,15,144..) and use
- assembly instead (like in the C64), why shouldn't we extend this "macros"
- (mnemonics are just simple macros) to *anything* that can actually be made
- using (more or less) advanced macros? There's a *lot* that can be done,
- but we still can't call it a compiler because it's still 1:1 level with M/L.
- 2) If you think that C and ASM performaces get closer new CPU after new CPU,
- I can't really agree. The reasons you explained before make people exploit
- less the assembly advantages, for the implicit idea to keep on the tradition
- with pure assembly, where they should know that assembly itself is already
- not M/L. If C was really so good (and can't be, for definition, because it's
- a portable language, thus cannot be optimized to the best possible), then why
- dont they implement C facilitations into the CPU instruction set? The 68000
- was made to support high level languages, but how come that the real power
- of 680x0 comes out only with assembly, while the 80x86 was not optimized
- so much for high level languages and allows to get so good C compilers?
- The reason is that the more a cpu is versatile, the more the human can
- get advantage on it, call it "heuristic" limits of compilers or any way,
- but actually while i.e. the Chess aren't really a game of intelligence
- (there's the alpha/beta algorithm to prove it), compilation and optimization
- *need* intelligence because some cases cannot be studied and resolved by a
- more or less generic algorithm, perhaps artificial intelligence could do
- (that is already intelligence), but no compiler actually is capable of AI.
-
- > after all why write a proggy in asm taking 12 months when you can do it in
- > C/C++ in 4-5???
-
- I dont code in ASM, want my VK's fully HLA sources? ;)
- Who codes fully in ASM? at this point why not machine language? ;) it would
- be a waste of time, because the (advanced) macros can do all the mechanical
- work, while the true optimizations are still yours (this is high level assembly,
- not an high level language), and you get only the funny part, not the boring
- one.
-
- >I hope this doesn't sound like a flame,
-
- Dont worry
-
- > I just want this thread to stop, you have your opinions and let everyone
- > else have their's, personally I can wait to see your VR Demos at the Saturne..
- > ;-)
-
- ;-)
-
- >Andy
-
- The only people that I really can't "respect" is who comes out with no idea
- of what is talking about, just to talk..
- This is not your case though.
-
-
- Greets
-
- >--
- >+---------------------------------====#====-----------------------------+
- >| Andy Savage - Amiga Multimedia Programmer |
- >| Amiga, Drumming, Eastenders, Hamster, Tarantino and Worms fanatic |
- >+---------------------------------====#====-----------------------------+
-
-
-
-
- /-----------------------------------------------------------------------\
- | Fabio "Maverick" Bizzetti - bizzetti@mbox.vol.it - Maverick* at IRC |
- | The maker of "CyberMan" and "Virtual Karting" |
- | working on "VirtualRally" & "StarFighter" |
- \-----------------------------------------------------------------------/
-
-
-